home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Commander Sets / 4D Speech Pack / 4D Speech Pack.rsrc / TEXT_22639_†SP Speak Text.txt < prev    next >
Encoding:
Text File  |  1994-09-14  |  2.7 KB  |  52 lines

  1. SP Speak Text (voice; lines; first; last) -> err
  2.  
  3. voice          string (63) specifys the voice you want to use.
  4. lines           text           is a text variable or field which contains the
  5.                                    text you want to be spoken.
  6. first           integer       specifys on which location to start reading.
  7. last            integer       specifying on which location to stop reading.
  8.                                    This is the position of the last character selected
  9.                                     plus one!
  10. err             integer       returns the error which occured. 
  11.                                     A value of zero indicates no error occured. See 
  12.                                     below for a list of possible errors.
  13.  
  14. Reads out the text you pass using the specified voice and starting and stopping on the specified locations, without returning to 4D until the lines have been spoken.
  15.  
  16. The ‚Äùfirst‚Äú and ‚Äùlast‚Äú parameters work like the parameters used with the standard GET HIGHLIGHT and HIGHLIGHT TEXT 4D commands.
  17. The specified selection of the text will be spoken and control will not return to 4D until speaking is finished. It is not possible to cancel. This function can still be used when the limit of speech channels opened by the SP Open Voice function has been reached.
  18. If one of the ‚Äùfirst‚Äú and ‚Äùlast‚Äú parameters is negative, zero or if they are equal the full text will be read to you. And, ofcourse, also when ‚Äùfirst‚Äú is one and ‚Äùlast‚Äú is the length of the text plus one.
  19.  
  20. Examples:
  21.   `these all have the same effect
  22.   $err := SP Speak Text ("Marvin";[File 1]Description;0;0)
  23.   $err := SP Speak Text ("Marvin";[File 1]Description;1;1)
  24.   $err := SP Speak Text ("Marvin";[File 1]Description;1;33000)
  25.   $err := SP Speak Text ("Marvin";[File 1]Description;1;
  26.                Length([File 1]Description) + 1)
  27.  
  28.   `and this one will ignore the last character
  29.   $err := SP Speak Text ("Marvin";[File 1]Description;1;
  30.                Length([File 1]Description))
  31.  
  32.   `and this one will only say "Speech Manager"
  33.   $lines := "Testing Speech Manager"
  34.   $err := SP Speak Text ("Marvin";$lines;9;Length ($lines) + 1)
  35.  
  36. Possible errors:
  37.         0  No Error
  38.       -4  Speech Pack can not be used (Speech Mgr not available)
  39.     -50  Parameter error (inside external, not necessarily the
  40.             parameters you pass)
  41.   -108  Not enough memory to load voice into memory    
  42.   -205  Bad channel, speaker volume is too low or Speech Pack disabled
  43.   -241  Could not open another speech synthesizer channel
  44.   -242  Voice synthesizer is not ready
  45.   -244  Voice resource not found
  46.   -247  Input text bad
  47. -3000  Invalid SpeechChannel parameter, probably invalid reference
  48.             number
  49.  
  50.  
  51.  
  52.